<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>商品分类管理</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<% include("/admin/resource/common_css.html"){} %>
	</head>
	<body>
		<% include("/admin/common/header.html"){} %>
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>
			<div class="main-container-inner">
				<% include("/admin/common/menu.html",{currentstr:"商品"}){} %>
				<div class="main-content">
			      <% include("/admin/common/breadcrumb.html",{breadaddfirst:"商品管理",breadaddsecond:"分类属性管理",breadaddthird:"分类属性列表"}){} %>
					<div class="page-content">
				       <div class="page-content" id="content">
				         <table>
			                <tr>
							  <td><a href="javascript:;" onclick="EditDetail(this, 'add')" class="btn btn-success addbtn">添加</a></td>
							 </tr> 
						   </table>
					     <div id="chnllist" style="margin-top: 40px;">
						<table class="table table-striped table-bordered table-hover">
							<thead>
							<tr>
								<th>编号</th>
								<th>属性类别</th>
								<th width="200">操作</th>
							</tr>
							</thead>
							<%for(attribute in attributes.list){%>
								<tr>
									<td>
									   ${attributeLP.index!}
									   <input type="hidden" class="jsonData" value='{"id":"${attribute.id!}","attr_name":"${attribute.attr_name!}","sort":"${attribute.attr_sort!}"}'/>
									</td>
									<td>
				                       ${attribute.attr_name!}
									</td>
									<td>
									  <a href="javascript:;" onclick="EditDetail(this)" class="btn btn-info">编辑</a>  
									  <a href="#" onclick='delrow("${ctx!}/admin/shop/attr/delete",this,"${attribute.id!}")'  class="btn btn-danger">删除</a>
									</td>
								</tr>
							<%}%>
						</table>
						</div>
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

				<% include("/admin/common/acesetting.html"){}%>
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->
	<% include("/admin/common/footer.html"){} %>
	<% include("/admin/resource/common_js.html"){} %>
	<script id="editTmp" type="text/template">
	 <div id="editBox" class="bootbox modal fade in" tabindex="-1" role="dialog" aria-hidden="false" style="top: 40%;">
	   <div class="modal-dialog">
	    <div class="modal-content">
	     <div class="modal-header">
	      <button type="button" onclick="$('#editBox').remove();" class="bootbox-close-button close">&times;</button>
	      <h4 class="modal-title">{txt}</h4>
	     </div>
	     <div class="modal-body">
	      <div class="bootbox-body">
		   <input type="hidden" name="id" class="detail_id" value="{id}">
	       <label>　　编号: <input type="text" name="attr_sort" value="{sort}"><span></span></label>
	       <label>属性名称: <input type="text" name="attr_name" value="{attr}"><span></span></label>
	      </div>
	     </div>
	     <div class="modal-footer">
	      <button id="sava" type="button" class="btn btn-primary">保存</button>
	      <button id="cancel" onclick="$('#editBox').remove();" type="button" class="btn btn-default">取消</button>
	     </div>
	    </div>
	   </div>
	  </div>
	</script>
	<script src="${ctx}/js/admin/attribute.js"></script>
</body>
</html>

